package org.yelongframework.model.support.service.base;

import java.util.Objects;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.yelongframework.model.service.SqlModelService;
import org.yelongframework.sql.store.SqlStore;

/**
 * 基础模型服务实现
 * 
 * @since 1.0.0
 */
public abstract class BaseModelServiceImpl extends BaseModelService {

	private static final Logger logger = LoggerFactory.getLogger(BaseModelServiceImpl.class);

	/** 模型服务 */
	protected final SqlModelService modelService;

	/**
	 * @param modelService 模型服务
	 */
	public BaseModelServiceImpl(SqlModelService modelService) {
		this.modelService = Objects.requireNonNull(modelService, "modelService cannot be null");
	}

	@Override
	public SqlModelService getModelService() {
		return modelService;
	}

	@Override
	public SqlStore getSqlStore() {
		logger.info("不支持使用SqlStore");
		return null;
	}

}
